package com.cande.loki;

import com.alibaba.nacos.api.annotation.NacosProperties;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;
import com.cande.loki.exercise.nacos.TimeWindowConfig;
import com.cande.loki.exercise.testspring.MyApplicationContextInitializer;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@EnableConfigurationProperties(TimeWindowConfig.class)
@ConfigurationPropertiesScan
//@EnableApolloConfig
//@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))
public class LokiApplication {

    public static void main(String[] args) {

        SpringApplication.run(LokiApplication.class, args);
//        SpringApplication springApplication = new SpringApplication(LokiApplication.class);
//        springApplication.addInitializers(new MyApplicationContextInitializer());
//        springApplication.run(args);
    }

}
